<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        const obj = {};
        let a = Symbol('a');
        let b = Symbol('b');
        obj[a] = 'aSymbol';
        obj[b] = 'bSymbol';
        const arr = Object.getOwnPropertySymbols(obj);
        console.log(arr); // [Symbol(a), Symbol(b)]
        for (const iterator of arr) {
            console.log(obj[iterator]); // aSymbol bSymbol
        }
    </script>
</body>
</html>